import { App } from 'vue'

//处理按钮点击后激活状态
const blurDirective = (app: App) => {
  app.directive('blur', {
    mounted(el) {
      el.addEventListener('focus', () => {
        el.blur()
      })
    }
  })
}

export const directives = (app: App) => {
  // 点击后自动失焦指令
  blurDirective(app)
}
